package com.rw.coco.api.data.persistence.simple;

import com.rw.coco.api.data.model.CardModel;
import com.rw.coco.api.data.persistence.CardMapper;

import java.util.List;

/**
 * 简单实现CardMapper类
 * 注意，如果实现这个类，则不保证调用原子性
 */
public abstract class SimpleCardMapper implements CardMapper, BaseSimpleMapper<CardModel> {
    /**
     * 获取某个卡堆的所有卡片的信息
     *
     * @param deckId 卡堆id
     * @return 所有卡片
     */
    @Override
    public List<CardModel> getAllCards(int deckId) {
        CardModel select = new CardModel();
        select.setDeckId(deckId);
        return selectList(select);
    }
}
